package naga.x.platform2.channel.q724.support;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import com.alibaba.fastjson.JSON;

import naga.x.platform2.App;

@Configuration
@EnableAutoConfiguration
@ConfigurationProperties(locations = "classpath:7724.properties")
public class Q724Config implements InitializingBean {

	private String appKey;
	private String commonKey; // 通用验证
	private String payKey; // 验证支付
	private String callbackKey; // 回调验证
	private String payUrl; // 支付下单url
	private String accUrl; // 获取用户信息url

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getCommonKey() {
		return commonKey;
	}

	public void setCommonKey(String commonKey) {
		this.commonKey = commonKey;
	}

	public String getPayKey() {
		return payKey;
	}

	public void setPayKey(String payKey) {
		this.payKey = payKey;
	}

	public String getCallbackKey() {
		return callbackKey;
	}

	public void setCallbackKey(String callbackKey) {
		this.callbackKey = callbackKey;
	}

	public String getPayUrl() {
		return payUrl;
	}

	public void setPayUrl(String payUrl) {
		this.payUrl = payUrl;
	}

	public String getAccUrl() {
		return accUrl;
	}

	public void setAccUrl(String accUrl) {
		this.accUrl = accUrl;
	}
	
	@Override
	public String toString() {
		return "[appKey=" + appKey + ", commonKey=" + commonKey + ", payKey=" + payKey + ", callbackKey="
				+ callbackKey + ", payUrl=" + payUrl + ", accUrl=" + accUrl + "]";
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		App.LOG.info("[7724 CONFIG LOADED]{}", this);
	}

}
